﻿<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ArchiSimple.Windows" xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="ArchiSimple.Windows.App" StartupUri="MainWindow.xaml" mc:Ignorable="d">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- 
                    Styles définissant l'apparence globale de la plateforme
                    Requis par les modèles de projets et les modèles d'éléments Visual Studio
                 -->
                <ResourceDictionary Source="Common/Default.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="{x:Type TextBox}">
                <Setter Property="Foreground" Value="{StaticResource GraySolidColor}" />
                <Setter Property="FontSize" Value="24" />
                <Setter Property="BorderBrush" Value="{StaticResource GraySolidColor}" />
                <Setter Property="Template">
                    <Setter.Value>                        
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <Grid Height="35">
                            <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="1">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Disabled"/>
                                        <VisualState x:Name="ReadOnly"/>
                                        <VisualState x:Name="MouseOver"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ValidationStates">
                                        <VisualState x:Name="InvalidFocused"/>
                                        <VisualState x:Name="InvalidUnfocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>